import cglibProxy.CglibProxy;
import entity.Tiger;
import entity.Worker;

/**
 * @Author Yenchingcheng
 * @Date 2023/6/13 21:05
 * @Description
 **/
public class Main {

    public static void main(String[] args) {
        CglibProxy proxy = new CglibProxy(new Tiger("泰格"));
        Tiger tiger = (Tiger) proxy.getProxy();
        tiger.sleep();
        tiger.wakeUp();

        proxy = new CglibProxy(new Worker("卫国"));
        Worker worker = (Worker) proxy.getProxy();
        worker.sleep();
        worker.wakeUp();
    }
}
